﻿@using Webdiyer.WebControls.Mvc;
@using HiLand.General.Entity;
@using HiLand.Utility4.MVC;
@using GBFinance.Entity;
@using GBFinance.Web.Models;
@model PagedList<LoanBasicEntity>
@{
    ViewBag.Title = "Secured Loan List";
}
<style type="text/css">
    .modalFix
    {
        width: 650px;
    }
</style>
<h2>
    Secured Loan List</h2>
<div id="ItemListDIV">
    <table width="98%" class="grid">
        <tr>
            <th style="width: 150px">
                Operate
            </th>
            <th style="width: 30px">
                No.
            </th>
            <th style="width: 50px">
                Loan Status
            </th>
            <th style="width: 80px">
                Loan Amount
            </th>
            <th style="width: 60px">
                Loan Date
            </th>
            <th>
                Enterprise Name
            </th>
        </tr>
        @foreach (LoanBasicEntity entity in Model)
        {     
            <tr>
                <td>
                    @Html.Link("Details", @Url.Action("LoanDetails", "SecuredLoan", new { loanGuid = entity.LoanGuid }), null)
                    @Html.Link("Schedule", @Url.Action("ScheduleList", "SecuredLoan", new { loanGuid = entity.LoanGuid }), null)
                </td>
                <td>@entity.LoanID
                </td>
                <td>@entity.LoanStatus.ToString()
                </td>
                <td>@entity.LoanAmount.ToString()
                </td>
                <td>@entity.LoanDate.ToString(Miscs.DateTimeFormating)
                </td>
                <td>@entity.LoanUserName
                </td>
            </tr>   
        }
    </table>
    @Html.Pager(Model, new PagerOptions() { PageIndexParameterName = "id", ShowDisabledPagerItems = false, AlwaysShowFirstLastPageNumber = true })
    <script type="text/javascript">
        $(document).ready(function () {
            $(".modalInput").overlay({
                mask: {
                    color: '#ebecff',
                    loadSpeed: 200,
                    opacity: 0.9
                },
                closeOnClick: false
            });
        });
    </script>
</div>
